home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK2.toast / Development Kits (Disc 2) / QuickDraw GX / Programming Stuff / Sample Code / Graphics Samples / Test Cubics (cubic to quad) ƒ / TestCubics.r < prev    next >
Encoding:
Text File  |  1996-04-11  |  5.5 KB  |  280 lines  |  [TEXT/MPS ]

  1. /**\
  2. |**| =====================================================================
  3. |**|
  4. |**|    FILENAME
  5. |**|        TestCubics.r
  6. |**|    
  7. |**|    DESCRIPTION
  8. |**|        This is the resource file for the TestCubics Quickdraw GX
  9. |**|        sample program.
  10. |**|    
  11. |**|    COPYRIGHT
  12. |**|        ©1992-1996 Copyright Apple Computer, Inc.
  13. |**|        All rights reserved.
  14. |**|    
  15. |**|    Change History:
  16. |**|
  17. |**|        4/96    cnn        Updated the header filename, description, and
  18. |**|                    copyright. Changed About Apple menu item to the
  19. |**|                    correct name "About TestCubics". Changed mClip to
  20. |**|                    mPoints. Changed window title to "Test Cubics".
  21. |**|                    Updated version strings. Removed non-functional
  22. |**|                    "Open..." and "Save As..." menu items from File menu.
  23. |**|                    Removed unused rClearDITL and rClearAlert.
  24. |**|
  25. |**| =====================================================================
  26. \**/
  27.  
  28. #include "SysTypes.r"
  29. #include "Types.r"
  30.  
  31. #include "TestCubicsRef.h"
  32.  
  33.  
  34. resource 'vers' (1) {
  35.     0x01, 0x00, development, 0x1B,
  36.     verUS,
  37.     "1.0d27",
  38.     "1.0d27, Copyright © 1992-1996 Apple Computer, Inc."
  39. };
  40.  
  41. /* we use an MBAR resource to conveniently load all the menus */
  42.  
  43. resource 'MBAR' (rMenuBar, preload) {
  44.     { mApple, mFile, mEdit, mPoints, mError };        /* three menus */
  45. };
  46.  
  47.  
  48. resource 'MENU' (mApple, preload) {
  49.     mApple, textMenuProc,
  50.     0b1111111111111111111111111111101,    /* disable dashed gxLine, enable About and DAs */
  51.     enabled, apple,
  52.     {
  53.         "About TestCubics…",
  54.             noicon, nokey, nomark, plain;
  55.         "-",
  56.             noicon, nokey, nomark, plain
  57.     }
  58. };
  59.  
  60. resource 'MENU' (mFile, preload) {
  61.     mFile, textMenuProc,
  62.     0b0000000000000000000000000000001,    /* enable quit */
  63.     enabled, "File",
  64.     {
  65.         "Quit",
  66.             noicon, "Q", nomark, plain
  67.     }
  68. };
  69.  
  70. resource 'MENU' (mEdit, preload) {
  71.     mEdit, textMenuProc,
  72.     0b0000000000000000000000000000000,    /* disable everything, program does the enabling */
  73.     enabled, "Edit",
  74.      {
  75.         "Undo",
  76.             noicon, "Z", nomark, plain;
  77.         "-",
  78.             noicon, nokey, nomark, plain;
  79.         "Cut",
  80.             noicon, "X", nomark, plain;
  81.         "Copy",
  82.             noicon, "C", nomark, plain;
  83.         "Paste",
  84.             noicon, "V", nomark, plain;
  85.         "Clear",
  86.             noicon, nokey, nomark, plain
  87.     }
  88. };
  89.  
  90. resource 'MENU' (mPoints, preload) {
  91.     mPoints, textMenuProc,
  92.     allEnabled,
  93.     enabled, "Points",
  94.     {
  95.         "Automatic",
  96.             noicon, "0", check, plain;
  97.         "1",
  98.             noicon, "1", nomark, plain;
  99.         "2",
  100.             noicon, "2", nomark, plain;
  101.         "3",
  102.             noicon, "3", nomark, plain;
  103.         "4",
  104.             noicon, "4", nomark, plain;
  105.         "5",
  106.             noicon, "5", nomark, plain;
  107.         "6",
  108.             noicon, "6", nomark, plain;
  109.         "7",
  110.             noicon, "7", nomark, plain;
  111.         "8",
  112.             noicon, "8", nomark, plain;
  113.         "9",
  114.             noicon, "9", nomark, plain;
  115.         "10",
  116.             noicon, nokey, nomark, plain
  117.  
  118.  
  119.     }
  120. };
  121.  
  122. resource 'MENU' (mError, preload) {
  123.     mError, textMenuProc,
  124.     allEnabled,
  125.     enabled, "Error",
  126.     {
  127.         "0.01",
  128.             noicon, nokey, nomark, plain;
  129.         "0.25",
  130.             noicon, nokey, check, plain;
  131.         "0.5",
  132.             noicon, nokey, nomark, plain;
  133.         "0.75",
  134.             noicon, nokey, nomark, plain;
  135.         "1.0",
  136.             noicon, nokey, nomark, plain;
  137.         "2.0",
  138.             noicon, nokey, nomark, plain;
  139.         "4.0",
  140.             noicon, nokey, nomark, plain;
  141.         "8.0",
  142.             noicon, nokey, nomark, plain
  143.     }
  144. };
  145.  
  146. resource 'ALRT' (rAboutAlert) {
  147.     {40, 40, 206, 320},
  148.     rAboutDITL,
  149.     {     
  150.         OK, visible, silent,
  151.         OK, visible, silent,
  152.         OK, visible, silent,
  153.         OK, visible, silent
  154.     }
  155. };
  156.  
  157. resource 'DITL' (rAboutDITL) {
  158.     { /* array DITLarray: 5 elements */
  159.         /* [1] */
  160.         {122, 196, 142, 256},
  161.         Button {
  162.             enabled,
  163.             "OK"
  164.         },
  165.         /* [2] */
  166.         {12, 16, 54, 253},
  167.         StaticText {
  168.             disabled,
  169.             "Test application for the conversion of cubics"
  170.         },
  171.         /* [3] */
  172.         {65, 16, 85, 270},
  173.         StaticText {
  174.             disabled,
  175.             "Copyright ©1992-96 Apple Computer"
  176.         },
  177.         /* [4] */
  178.         {97, 16, 119, 153},
  179.         StaticText {
  180.             disabled,
  181.             "Brought to you by:"
  182.         },
  183.         /* [5] */
  184.         {130, 16, 152, 118},
  185.         StaticText {
  186.             disabled,
  187.             "Hugo M. Ayala"
  188.         }
  189.     }
  190. };
  191.  
  192. resource 'WIND' (rDocWindow, preload, purgeable) {
  193.     {64, 60, 314, 460},
  194.     zoomDocProc, invisible, goAway, 0x0, "Test Cubics"
  195. };
  196.  
  197. resource 'SIZE' (-1) {
  198.     dontSaveScreen,
  199.     ignoreSuspendResumeEvents,
  200.     disableOptionSwitch,
  201.     cannotBackground,
  202.     notMultiFinderAware,
  203.     backgroundAndForeground,
  204.     dontGetFrontClicks,
  205.     ignoreChildDiedEvents,
  206.     is32BitCompatible,
  207.     reserved,
  208.     reserved,
  209.     reserved,
  210.     reserved,
  211.     reserved,
  212.     reserved,
  213.     reserved,
  214.     kPrefSize * 1024,
  215.     kMinSize * 1024
  216. };
  217.  
  218.  
  219. type 'TCUB' as 'STR ';
  220.  
  221.  
  222. resource 'TCUB' (0) {
  223.     "Test program for cubics"
  224. };
  225.  
  226.  
  227. resource 'BNDL' (rBndl) {
  228.     'TCUB',
  229.     0,
  230.     {
  231.         'ICN#',
  232.         {
  233.             0, rIcon
  234.         },
  235.         'FREF',
  236.         {
  237.             0, rFref
  238.         }
  239.     }
  240. };
  241.  
  242.  
  243. resource 'FREF' (rFref) {
  244.     'APPL',
  245.     0,
  246.     ""
  247. };
  248.  
  249.  
  250. resource 'ICN#' (rIcon) {
  251.     { /* array: 2 elements */
  252.         /* [1] */
  253.         $"00 00 00 00 00 03 00 00 00 07 80 00 00 08 40 00"
  254.         $"00 10 20 00 00 20 10 00 00 40 08 00 00 80 04 00"
  255.         $"01 00 02 00 02 10 21 00 04 10 20 80 08 08 60 40"
  256.         $"10 08 40 20 20 04 80 10 40 04 80 08 C0 03 00 0C"
  257.         $"C0 03 00 0C 40 03 00 08 20 07 80 10 10 18 60 20"
  258.         $"08 24 90 40 04 24 90 80 02 18 61 00 01 00 02 00"
  259.         $"00 80 04 00 00 40 08 00 00 20 10 00 00 10 20 00"
  260.         $"00 08 40 00 00 07 80 00 00 03",
  261.         /* [2] */
  262.         $"00 00 00 00 00 03 00 00 00 07 80 00 00 0F C0 00"
  263.         $"00 1F E0 00 00 3F F0 00 00 7F F8 00 00 FF FC 00"
  264.         $"01 FF FE 00 03 EF DF 00 07 EF DF 80 0F F7 BF C0"
  265.         $"1F F7 BF E0 3F FB 7F F0 7F FB 7F F8 FF FC FF FC"
  266.         $"FF FC FF FC 7F FC FF F8 3F F8 7F F0 1F E7 9F E0"
  267.         $"0F DB 6F C0 07 DB 6F 80 03 E7 9F 00 01 FF FE 00"
  268.         $"00 FF FC 00 00 7F F8 00 00 3F F0 00 00 1F E0 00"
  269.         $"00 0F C0 00 00 07 80 00 00 03"
  270.     }
  271. };
  272.  
  273. resource 'CURS' (rHandCurs) {
  274.     $"01 80 1A 70 26 48 26 4A 12 4D 12 49 6A 09 98 01"
  275.     $"88 02 40 02 20 02 20 04 10 04 08 08 04 08 04 08",
  276.     $"01 80 1B F0 3F F8 3F FA 1F FF 1F FF 7F FF FF FF"
  277.     $"FF FE 7F FE 3F FE 3F FC 1F FC 0F F8 07 F8 07 F8",
  278.     {8, 5}
  279. };
  280.